home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / man.n / pack-old.n < prev    next >
Text File  |  1995-07-21  |  13KB  |  406 lines

  1. '\"
  2. '\" Copyright (c) 1990-1992 The Regents of the University of California.
  3. '\" All rights reserved.
  4. '\"
  5. '\" Permission is hereby granted, without written agreement and without
  6. '\" license or royalty fees, to use, copy, modify, and distribute this
  7. '\" documentation for any purpose, provided that the above copyright
  8. '\" notice and the following two paragraphs appear in all copies.
  9. '\"
  10. '\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
  11. '\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
  12. '\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  13. '\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  14. '\"
  15. '\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  16. '\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  17. '\" AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
  18. '\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
  19. '\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  20. '\" 
  21. '\" $Header: /user6/ouster/wish/man/RCS/pack-old.n,v 1.4 93/09/12 21:43:19 ouster Exp $ SPRITE (Berkeley)
  22. '/" 
  23. .\" The definitions below are for supplemental macros used in Tcl/Tk
  24. .\" manual entries.
  25. .\"
  26. .\" .HS name section [date [version]]
  27. .\"    Replacement for .TH in other man pages.  See below for valid
  28. .\"    section names.
  29. .\"
  30. .\" .AP type name in/out [indent]
  31. .\"    Start paragraph describing an argument to a library procedure.
  32. .\"    type is type of argument (int, etc.), in/out is either "in", "out",
  33. .\"    or "in/out" to describe whether procedure reads or modifies arg,
  34. .\"    and indent is equivalent to second arg of .IP (shouldn't ever be
  35. .\"    needed;  use .AS below instead)
  36. .\"
  37. .\" .AS [type [name]]
  38. .\"    Give maximum sizes of arguments for setting tab stops.  Type and
  39. .\"    name are examples of largest possible arguments that will be passed
  40. .\"    to .AP later.  If args are omitted, default tab stops are used.
  41. .\"
  42. .\" .BS
  43. .\"    Start box enclosure.  From here until next .BE, everything will be
  44. .\"    enclosed in one large box.
  45. .\"
  46. .\" .BE
  47. .\"    End of box enclosure.
  48. .\"
  49. .\" .VS
  50. .\"    Begin vertical sidebar, for use in marking newly-changed parts
  51. .\"    of man pages.
  52. .\"
  53. .\" .VE
  54. .\"    End of vertical sidebar.
  55. .\"
  56. .\" .DS
  57. .\"    Begin an indented unfilled display.
  58. .\"
  59. .\" .DE
  60. .\"    End of indented unfilled display.
  61. .\"
  62. '\"    # Heading for Tcl/Tk man pages
  63. .de HS
  64. .ds ^3 \\0
  65. .if !"\\$3"" .ds ^3 \\$3
  66. .if '\\$2'cmds'       .TH \\$1 1 \\*(^3 \\$4
  67. .if '\\$2'lib'        .TH \\$1 3 \\*(^3 \\$4
  68. .if '\\$2'tcl'        .TH \\$1 n \\*(^3 Tcl "Tcl Built-In Commands"
  69. .if '\\$2'tk'         .TH \\$1 n \\*(^3 Tk "Tk Commands"
  70. .if '\\$2'tclc'        .TH \\$1 3 \\*(^3 Tcl "Tcl Library Procedures"
  71. .if '\\$2'tkc'         .TH \\$1 3 \\*(^3 Tk "Tk Library Procedures"
  72. .if '\\$2'tclcmds'         .TH \\$1 1 \\*(^3 Tk "Tcl Applications"
  73. .if '\\$2'tkcmds'         .TH \\$1 1 \\*(^3 Tk "Tk Applications"
  74. .if t .wh -1.3i ^B
  75. .nr ^l \\n(.l
  76. .ad b
  77. ..
  78. '\"    # Start an argument description
  79. .de AP
  80. .ie !"\\$4"" .TP \\$4
  81. .el \{\
  82. .   ie !"\\$2"" .TP \\n()Cu
  83. .   el          .TP 15
  84. .\}
  85. .ie !"\\$3"" \{\
  86. .ta \\n()Au \\n()Bu
  87. \&\\$1    \\fI\\$2\\fP    (\\$3)
  88. .\".b
  89. .\}
  90. .el \{\
  91. .br
  92. .ie !"\\$2"" \{\
  93. \&\\$1    \\fI\\$2\\fP
  94. .\}
  95. .el \{\
  96. \&\\fI\\$1\\fP
  97. .\}
  98. .\}
  99. ..
  100. '\"    # define tabbing values for .AP
  101. .de AS
  102. .nr )A 10n
  103. .if !"\\$1"" .nr )A \\w'\\$1'u+3n
  104. .nr )B \\n()Au+15n
  105. .\"
  106. .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
  107. .nr )C \\n()Bu+\\w'(in/out)'u+2n
  108. ..
  109. '\"    # BS - start boxed text
  110. '\"    # ^y = starting y location
  111. '\"    # ^b = 1
  112. .de BS
  113. .br
  114. .mk ^y
  115. .nr ^b 1u
  116. .if n .nf
  117. .if n .ti 0
  118. .if n \l'\\n(.lu\(ul'
  119. .if n .fi
  120. ..
  121. '\"    # BE - end boxed text (draw box now)
  122. .de BE
  123. .nf
  124. .ti 0
  125. .mk ^t
  126. .ie n \l'\\n(^lu\(ul'
  127. .el \{\
  128. .\"    Draw four-sided box normally, but don't draw top of
  129. .\"    box if the box started on an earlier page.
  130. .ie !\\n(^b-1 \{\
  131. \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  132. .\}
  133. .el \}\
  134. \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  135. .\}
  136. .\}
  137. .fi
  138. .br
  139. .nr ^b 0
  140. ..
  141. '\"    # VS - start vertical sidebar
  142. '\"    # ^Y = starting y location
  143. '\"    # ^v = 1 (for troff;  for nroff this doesn't matter)
  144. .de VS
  145. .mk ^Y
  146. .ie n 'mc \s12\(br\s0
  147. .el .nr ^v 1u
  148. ..
  149. '\"    # VE - end of vertical sidebar
  150. .de VE
  151. .ie n 'mc
  152. .el \{\
  153. .ev 2
  154. .nf
  155. .ti 0
  156. .mk ^t
  157. \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
  158. .sp -1
  159. .fi
  160. .ev
  161. .\}
  162. .nr ^v 0
  163. ..
  164. '\"    # Special macro to handle page bottom:  finish off current
  165. '\"    # box/sidebar if in box/sidebar mode, then invoked standard
  166. '\"    # page bottom macro.
  167. .de ^B
  168. .ev 2
  169. 'ti 0
  170. 'nf
  171. .mk ^t
  172. .if \\n(^b \{\
  173. .\"    Draw three-sided box if this is the box's first page,
  174. .\"    draw two sides but no top otherwise.
  175. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  176. .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  177. .\}
  178. .if \\n(^v \{\
  179. .nr ^x \\n(^tu+1v-\\n(^Yu
  180. \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
  181. .\}
  182. .bp
  183. 'fi
  184. .ev
  185. .if \\n(^b \{\
  186. .mk ^y
  187. .nr ^b 2
  188. .\}
  189. .if \\n(^v \{\
  190. .mk ^Y
  191. .\}
  192. ..
  193. '\"    # DS - begin display
  194. .de DS
  195. .RS
  196. .nf
  197. .sp
  198. ..
  199. '\"    # DE - end display
  200. .de DE
  201. .fi
  202. .RE
  203. .sp .5
  204. ..
  205. .HS pack-old tk
  206. .BS
  207. '\" Note:  do not modify the .SH NAME line immediately below!
  208. .SH NAME
  209. pack \- Obsolete syntax for packer geometry manager
  210. .SH SYNOPSIS
  211. \fBpack after \fIsibling \fIwindow options\fR ?\fIwindow options \fR...?
  212. .sp
  213. \fBpack append \fIparent \fIwindow options\fR ?\fIwindow options \fR...?
  214. .sp
  215. \fBpack before \fIsibling \fIwindow options\fR ?\fIwindow options \fR...?
  216. .sp
  217. \fBpack info \fIparent\fR
  218. .sp
  219. \fBpack unpack \fIwindow\fR
  220. .BE
  221.  
  222. .SH DESCRIPTION
  223. .PP
  224. \fINote: this manual entry describes the syntax for the \fBpack\fI
  225. command as it before Tk version 3.3.
  226. Although this syntax continues to be supported for backward
  227. compatibility, it is obsolete and should not be used anymore.
  228. At some point in the future it may cease to be supported.\fR
  229. .PP
  230. The packer is a geometry manager that arranges the
  231. children of a parent by packing them in order around the edges of
  232. the parent.  The first child is placed against one side of
  233. the window, occupying the entire span of the window along that
  234. side.  This reduces the space remaining for other children as
  235. if the side had been moved in by the size of the first child.
  236. Then the next child is placed against one side of the remaining
  237. cavity, and so on until all children have been placed or there
  238. is no space left in the cavity.
  239. .PP
  240. The \fBbefore\fR, \fBafter\fR, and \fBappend\fR forms of the \fBpack\fR
  241. command are used to insert one or more children into the packing order
  242. for their parent.  The \fBbefore\fR form inserts the children before
  243. window \fIsibling\fR in the order;  all of the other windows must be
  244. siblings of \fIsibling\fR.  The \fBafter\fR form inserts the windows
  245. after \fIsibling\fR, and the \fBappend\fR form appends one or more
  246. windows to the end of the packing order for \fIparent\fR.  If a
  247. \fIwindow\fR named in any of these commands is already packed in
  248. its parent, it is removed from its current position in the packing
  249. order and repositioned as indicated by the command.  All of these
  250. commands return an empty string as result.
  251. .PP
  252. .VS
  253. The \fBunpack\fR form of the \fBpack\fR command removes \fIwindow\fR
  254. from the packing order of its parent and unmaps it.  After the
  255. execution of this command the packer will no longer manage
  256. \fIwindow\fR's geometry.
  257. .VE
  258. .PP
  259. The placement of each child is actually a four-step process;
  260. the \fIoptions\fR argument following each \fIwindow\fR consists of
  261. a list of one or more fields that govern the placement of that
  262. window.  In the discussion below, the term \fIcavity\fR refers
  263. to the space left in a parent when a particular child is placed
  264. (i.e. all the space that wasn't claimed by earlier children in
  265. the packing order).  The term \fIparcel\fR refers to the space
  266. allocated to a particular child;  this is not necessarily the
  267. same as the child window's final geometry.
  268. .PP
  269. The first step in placing a child is to determine which side of
  270. the cavity it will lie against.  Any one of the following options
  271. may be used to specify a side:
  272. .TP
  273. \fBtop\fR
  274. Position the child's parcel against the top of the cavity,
  275. occupying the full width of the cavity.
  276. .TP
  277. \fBbottom\fR
  278. Position the child's parcel against the bottom of the cavity,
  279. occupying the full width of the cavity.
  280. .TP
  281. \fBleft\fR
  282. Position the child's parcel against the left side of the cavity,
  283. occupying the full height of the cavity.
  284. .TP
  285. \fBright\fR
  286. Position the child's parcel against the right side of the cavity,
  287. occupying the full height of the cavity.
  288. .LP
  289. At most one of these options should be specified for any given window.
  290. If no side is specified, then the default is \fBtop\fR.
  291. .PP
  292. The second step is to decide on a parcel for the child.  For \fBtop\fR
  293. and \fBbottom\fR windows, the desired parcel width is normally the cavity
  294. width and the desired parcel height is the window's requested height,
  295. as passed to \fBTk_GeometryRequest\fR. For \fBleft\fR and \fBright\fR
  296. windows, the desired parcel height is normally the cavity height and the
  297. desired width is the window's requested width.  However, extra
  298. space may be requested for the window using any of the following
  299. options:
  300. .TP 12
  301. \fBpadx \fInum\fR
  302. Add \fInum\fR pixels to the window's requested width before computing
  303. the parcel size as described above.
  304. .TP 12
  305. \fBpady \fInum\fR
  306. Add \fInum\fR pixels to the window's requested height before computing
  307. the parcel size as described above.
  308. .TP 12
  309. \fBexpand\fR
  310. This option requests that the window's parcel absorb any extra space left over
  311. in the parent's cavity after packing all the children.
  312. The amount of space left over depends on the sizes requested by the
  313. other children, and may be zero.  If several windows have all specified
  314. \fBexpand\fR then the extra width will be divided equally among all the
  315. \fBleft\fR and \fBright\fR windows that specified \fBexpand\fR and
  316. the extra height will be divided equally among all the \fBtop\fR and
  317. \fBbottom\fR windows that specified \fBexpand.
  318. .LP
  319. If the desired width or height for a parcel is larger than the corresponding
  320. dimension of the cavity, then the cavity's dimension is used instead.
  321. .PP
  322. The third step in placing the window is to decide on the window's
  323. width and height.  The default is for the window to receive either
  324. its requested width and height or the those of the parcel, whichever
  325. is smaller.  If the parcel is larger than the window's requested
  326. size, then the following options may be used to expand the
  327. window to partially or completely fill the parcel:
  328. .TP
  329. \fBfill\fR
  330. Set the window's size to equal the parcel size.
  331. .TP
  332. \fBfillx\fR
  333. Increase the window's width to equal the parcel's width, but retain
  334. the window's requested height.
  335. .TP
  336. \fBfilly\fR
  337. Increase the window's height to equal the parcel's height, but retain
  338. the window's requested width.
  339. .PP
  340. The last step is to decide the window's location within its parcel.
  341. If the window's size equals the parcel's size, then the window simply
  342. fills the entire parcel.  If the parcel is larger than the window,
  343. then one of
  344. the following options may be used to specify where the window should
  345. be positioned within its parcel:
  346. .TP 15
  347. \fBframe center\fR
  348. Center the window in its parcel.  This is the default if no framing
  349. option is specified.
  350. .TP 15
  351. \fBframe n\fR
  352. Position the window with its top edge centered on the top edge of
  353. the parcel.
  354. .TP 15
  355. \fBframe ne\fR
  356. Position the window with its upper-right corner at the upper-right corner
  357. of the parcel.
  358. .TP 15
  359. \fBframe e\fR
  360. Position the window with its right edge centered on the right edge of
  361. the parcel.
  362. .TP 15
  363. \fBframe se\fR
  364. Position the window with its lower-right corner at the lower-right corner
  365. of the parcel.
  366. .TP 15
  367. \fBframe s\fR
  368. Position the window with its bottom edge centered on the bottom edge of
  369. the parcel.
  370. .TP 15
  371. \fBframe sw\fR
  372. Position the window with its lower-left corner at the lower-left corner
  373. of the parcel.
  374. .TP 15
  375. \fBframe w\fR
  376. Position the window with its left edge centered on the left edge of
  377. the parcel.
  378. .TP 15
  379. \fBframe nw\fR
  380. Position the window with its upper-left corner at the upper-left corner
  381. of the parcel.
  382. .PP
  383. The \fBpack info\fR command may be used to retrieve information about
  384. the packing order for a parent.  It returns a list in the form
  385. .DS C
  386. \fIwindow options window options ...\fR
  387. .DE
  388. Each \fIwindow\fR is a name of a window packed in \fIparent\fR,
  389. and the following \fIoptions\fR describes all of the options for that
  390. window, just as they would be typed to \fBpack append\fR.
  391. The order of the list is the same as the packing order for
  392. \fIparent\fR.
  393. .PP
  394. The packer manages the mapped/unmapped state of all the packed
  395. children windows.  It automatically maps the windows when it packs
  396. them, and it unmaps any windows for which there was no space left
  397. in the cavity.
  398. .PP
  399. The packer makes geometry requests on behalf of the parent windows
  400. it manages.  For each parent window it requests a size large enough
  401. to accommodate all the options specified by all the packed children,
  402. such that zero space would be leftover for \fBexpand\fR options.
  403.  
  404. .SH KEYWORDS
  405. geometry manager, location, packer, parcel, size
  406.